Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save Docker image hash in RTD environment.json file #3880

Merged
merged 4 commits into from
Mar 31, 2018

Conversation

humitos
Copy link
Member

@humitos humitos commented Mar 30, 2018

Use the Docker image hash to check if the environment is obsolete.

Closes #3861

…3793)

* Remove obsolete code

Now, we can access `self.config.build_image` directly.

* Move container_image selection to the init

At initialization time we have the project and we already know if the
project has the build image override so we can decide at that point
and save it as a instance attribute.

Then we can use this values from other places inside the same class.

* Save Docker Image hash in readthedocs-environment.json

The hash is used to know if the environment is obsolete and auto-wipe
it if necessary.

* Simplify the class naming

* Save the image hash in the json file

* Lint

* Remove invalid properties from YAML config in tests

* Add test for save_environment_json
* when the file is corrupted or we don't have access, we return that
  it's OBSOLETE

* when there is a new setting that we need to compare and it's not in
  the JSON file, we return OBSOLETE
@humitos humitos requested a review from a team March 30, 2018 00:07
@agjohnson
Copy link
Contributor

We went over this one enough I think, and it has the fix we need. LGTM!

@agjohnson agjohnson merged commit 393e31a into master Mar 31, 2018
@agjohnson agjohnson deleted the humitos/rtdenv/save-image-hash branch March 31, 2018 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants